package com.jp.knowledge.my.business;

import com.jp.knowledge.R;
import com.jp.knowledge.my.model.OptionSelectModel;
import com.jp.knowledge.my.model.ItemSearchModel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author gzejia 978862664@qq.com
 */
public class ItemSearchBusiness {

    public List<OptionSelectModel> getOrganizeType() {
//        int[] img = {
//                R.mipmap.ic_my_company,
//                R.mipmap.ic_my_school,
//                R.mipmap.ic_my_maker,
//                R.mipmap.ic_my_organize};
//        String[] types = {"我是公司职工", "我是学校成员", "我是众创空间成员", "我在其他组织"};
//        List<OptionSelectModel> models = new ArrayList<>();
//
//        for (int i = 0, k = img.length; i < k; i++) {
//            OptionSelectModel model = new OptionSelectModel();
//            model.mContent = types[i];
//            model.mImage = img[i];
//            models.add(model);
//        }
        int[] img = {
                R.mipmap.ic_my_company,
                R.mipmap.ic_my_maker,
                R.mipmap.ic_my_organize};
        String[] types = {"我要创建公司", "我要创建众创空间", "我要创建其他组织"};
        List<OptionSelectModel> models = new ArrayList<>();

        for (int i = 0, k = img.length; i < k; i++) {
            OptionSelectModel model = new OptionSelectModel();
            model.mContent = types[i];
            model.mImage = img[i];
            models.add(model);
        }
        return models;
    }

    public List<ItemSearchModel> getOrganizes() {
        String[] names = {"桉云科技", "北图网络", "保罗地科技研发", "创将科技", "草莓无线",
                "递归科技", "唔系下网络", "小麦科技"};
        String[] imgUrl = {
                "http://img2.imgtn.bdimg.com/it/u=65693088,620645654&fm=21&gp=0.jpg",
                "http://img4.imgtn.bdimg.com/it/u=3556354988,1632408036&fm=21&gp=0.jpg",
                "http://img4.imgtn.bdimg.com/it/u=1425972139,1057908849&fm=21&gp=0.jpg",
                "http://img5.imgtn.bdimg.com/it/u=3513715794,3905546937&fm=21&gp=0.jpg",
                "http://img2.imgtn.bdimg.com/it/u=1337071823,298452525&fm=21&gp=0.jpg",
                "http://img4.imgtn.bdimg.com/it/u=138599861,345053951&fm=21&gp=0.jpg",
                "http://img2.imgtn.bdimg.com/it/u=165474088,203424886&fm=21&gp=0.jpg",
                "http://img1.imgtn.bdimg.com/it/u=2305609775,202646090&fm=21&gp=0.jpg"};
        int[] stats = {2, 2, 1, 0, 2, 2, 1, 0};
        List<ItemSearchModel> models = new ArrayList<>();

        for (int i = 0, k = names.length; i < k; i++) {
            ItemSearchModel model = new ItemSearchModel();
            model.setName(names[i]);
            model.setImageUrl(imgUrl[i]);
            model.setStats(stats[i]);
            models.add(model);
        }
        return models;
    }

    public List<ItemSearchModel> getSchools() {
        String[] names = {"广州艺术学院", "广州华南商贸职业学院", "广东工贸职业技术学院",
                "广东岭南职业技术学院", "广州体院职业学院", "广东省新闻出版技师学院",
                "广州民航职业技术学院", "广州中医大学", "华南农业大学"};
        List<ItemSearchModel> models = new ArrayList<>();

        for (int i = 0, k = names.length; i < k; i++) {
            ItemSearchModel model = new ItemSearchModel();
            model.setName(names[i]);
            models.add(model);
        }
        return models;
    }

    public List<ItemSearchModel> getFaculties() {
        String[] names = {"计算机系", "机电系", "电子信息系", "汽车系", "艺术设计与建筑系", "服装系",
                "美容美发系", "皮革设计系", "经济管理系", "旅游与酒店管理系", "其他院系"};
        List<ItemSearchModel> models = new ArrayList<>();

        for (int i = 0, k = names.length; i < k; i++) {
            ItemSearchModel model = new ItemSearchModel();
            model.setName(names[i]);
            models.add(model);
        }
        return models;
    }
}
